let clearTime;
const common = {

  state: {
    loadingShow: false,
  },
  mutations: {
    //数据加载状态
    setLoadingShow(state, data) {
      if(state.loadingShow){
        if(data){
          clearTime && clearTimeout(clearTime);
          clearTime = setTimeout(function(){
            state.loadingShow = false;
          },5000);
        } else {
          clearTime && clearTimeout(clearTime);
          clearTime = setTimeout(function(){
            state.loadingShow = false;
          },50);
        }
      } else {
        state.loadingShow = data;
      }
    }
  },
  actions: {
  
  }
}
export default common